//
//  PurchaseGoodsView.m
//  GLGW_Shoping
//
//  Created by yang on 2018/12/3.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "PurchaseGoodsView.h"

@interface PurchaseGoodsView ()
@property (nonatomic,strong) GLGWLabel * numLabel;
@property (nonatomic,strong) GLGWLabel * stellPicelabel;
@property (nonatomic,strong) GLGWLabel * stellNamelabel;

@end

@implementation PurchaseGoodsView

-(id)initWithFrame:(CGRect)aFrame inSuperView:(UIView *)aSuperView{
    if (self = [super initWithFrame:aFrame inSuperView:aSuperView]) {
        GLGWView * numView = [[GLGWView alloc] initWithFrame:CGRectMake(0, 0, kWidthProportion_In_iPhoneTriploid(22), kWidthProportion_In_iPhoneTriploid(22)) inSuperView:self];
        numView.backgroundColor = [UIColor whiteColor];
        [numView setViewShadowWidth:3.0 theCornerRadius:kWidthProportion_In_iPhoneTriploid(11)];
        //
        self.numLabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:kColor_Rule_Yellow inSuperView:numView];
        self.numLabel.text = @"1";
        [self.numLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.center.equalTo(numView);
        }];
        //
        self.stellPicelabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#EC5353"] inSuperView:self];
        self.stellPicelabel.textAlignment = NSTextAlignmentCenter;
        self.stellPicelabel.text = @"5000元/吨";
        [self.stellPicelabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(numView.mas_right).offset(kWidthProportion_In_iPhoneTriploid(2));
            make.top.right.equalTo(self).offset(0);
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
        }];
        //
        self.stellNamelabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#EC5353"] inSuperView:self];
        self.stellNamelabel.textAlignment = NSTextAlignmentCenter;
        self.stellNamelabel.text = @"鞍钢";
        [self.stellNamelabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.equalTo(self.stellPicelabel);
            make.bottom.equalTo(self.mas_bottom).offset(0);
        }];
    }
    return self;
}

@end
